package com.wangge.proxy.interfaceCase3;

import java.util.HashMap;
import java.util.Map;

/**
 * 标准代理模式<br/>
 * date: 2016年11月10日 上午9:51:40 <br/>
 * 
 * @author yangqc
 * @version
 * @since JDK 1.8
 */
public class WaiterProxy implements Waiter {
  private Waiter waiter;
    
  public WaiterProxy(Waiter waiter) {
    super();
    this.waiter = waiter;
  }

  @Override
  public void service(int sum) {
    waiter.service(sum);
  }
  
  public static void main(String[] args) {
    Waiter waiter=new WaiterProxy(new HotelWaiter());
    waiter.service(2);
  }
}
